Table of Contents To jump to a topic, select its title & choose "Next Case" (⌘N) To find a term in Glossary, select it & choose "Glossary" (⌘G) ViewIt™ 2.24 On-Line Help Copyrights Distribution Trademarks Warranties 1. Getting Started What Is ViewIt? About On-Line Help • The Help Control • Getting Around • Why On-Line Help? • Editing Help Debugging Aids • Program State • Command Display • Message Display • Interrupt Button Read Startup Topics Recompiling Demos Shareware Limits 2. What is FaceWare? 3. What is a module? 4. Where do they live? 5. How do I meet one? 6. Minimum Code • Pascal • C • C++ • FORTRAN 7. Include Files FaceStorXY File FaceProcXY File Other Include Files 8. Resource Files SIZE Resource Shared vs. Program-Specific Temporary Res Files More About LoadIt The FaceWare File Resource Numbering 9. Initializations FaceWare Initialization More About Stack Space Record Initialization 10. Event Handling 11. Summary New Programs Existing Programs 12. Tutorial The Objective 1. FaceWare File 2. Resource File 3. Project Files 4. Compile & Run 5. Main Menus 6. Menu Handling 7. Modal Window 8. Buttons 9. Modal Events 10. Check Box 11. Editable Text 12. Scrollable List 13. Pop-Up Menu 14. Data Links 15. Editable Controls 16. Advanced Controls 17. Attached Controls 18. Program Output F1. FaceIt 2.2 Guide Program Resources Mixing Event Loops F2. Initializations Menu Initialization • Auto-Loaded Menus • Hierarchical Menus • Pop-Up Menus Window Initialization • Main Help Window • Splash Screen Palette Initialization F3. The Main Loop Message Types Module Messages Apple Events Foreign Windows Greater Control • Overrides • WaitNextEvent F4. Menu Handling Menu Item Types • Unlabeled Program Items • Labeled Program Items • Program-Wide Standard Items • Shared Standard Items • Module-Specific Standard Items Font/Size/Style/Color Items Managing Menu Items Custom Standard Items (Advanced) • Negative Label IDs • Changing Label IDs • New Standard Items Balloon Help (System 7) F5. Background Processing (Advanced) Event-Oriented Task-Oriented • Getting Events • Update & Switch • Other Events • WaitNextEvent? Combinations F6. Finder Resources Adding File Icons Opening From Finder • Automatic Help • Technical Details Size and Behavior Program File Help F7. Hybrid Programs (Advanced) What Is FaceSt? When To Use FaceSt When NOT To Use It What You GAIN What You LOSE Initializations Done Installing FaceStub Using FaceStub • Main Menus • Menu Events • Raw Event Loop • Switching • Window Kind • Cursor Management • Program Termination • Custom Procedures • FSSC Menus V1. ViewIt 2.2 Guide V2. Editing Windows/Views/Controls Editing Resources Selecting Controls The Controls Bar The Icon Menu Bar • File Menu • Edit Menu • Import Menu • Info Menu • Style Menu • Align Menu • Grid Icon Outline Mode Saving Changes Getting Into Trouble V3. Windows Modal vs. Modeless Adding Windows MODAL WINDOWS • Item Events • Editable Items • Menu Events • Special Keys • Module Messages • Program Messages • Other Modal Events • Event Summary • Loop Options MODAL ALERTS MODELESS WINDOWS • Modeless Events • Modeless<->Modal FLOATING WINDOWS MENU WINDOWS Switching Content Closing Windows V4. Views About Control Drivers The View Driver • Operation • Scrolling • Content • Instructions • View Types • Attached Views • Paged Views • Colored Views • Limitations V5. Controls Getting Info Toolbox Calls Rectangles Scrolling Growing Floating Dragging Styles Colors Best Colors FSSC Support ID/RefCon V6. Data Links The Old Way The New Way • Data Types • Choosing Controls • Linking A Record • Linking A Variable • Using Links • Handle-To-Handle • Custom Links V7. Balloons (System 7) Help Command Format Example Commands V8. Override (Advanced) CONTENT DRAWING PROGRAM CONTROLS Example Projects Procedure Format Procedure Installation SELECTIVE OVERRIDES Override Format Override Installation Override Execution • Posting Events • Stealing Messages • Tweaking Messages • Major Action Before • Major Action After Limitations V9. Resources Shared FaceWare File Custom Resources Stand-Alone Programs Missing Resources V10. 2.05 -> 2.24 C1. FaceIt & ViewIt Commands Command Format Command Types Clobbered Variables C2. fRec Record C3. FaceIt Program Commands DoInit,DoLoop,DoEvnt,DoMenu,GetMsg C4. ViewIt Window Commands NewWnd,EndWnd,MdlWnd,SizWnd,MovWnd,ShoWnd, HidWnd,SavWnd,HlpWnd,DoUpdt C5. ViewIt Control Commands GetWnd,GetCtl,GetWVC,ShoCtl,ActCtl,SelCtl, HitCtl,SavCtl,DspCtl,GetVal,SetVal,AddVew, AddCtl,LnkCtl,OvrCtl,DrwCtl,SizCtl,MovCtl, ScrCtl,StlCtl,ClrCtl,SetInfo U1. Menu Utilities Labeled Items FSSC Menus PopMen,SetItm,GetItm,FixFSC,SelFSC U2. File Utilities StdOpn,StdSav,GetRef,SetRef,SetTyp U3. Window Utilities SetFSS,SndBhd,GetNam,SetNam, MovRec,MovAlt,MovDlg,MovWin, DrgWnd,GetStd,SetStd,SavDlg,SavWin U4. Color Utilities GetFgC,GetBkC,SetFgC,SetBkC,SetPal U5. Alert Utilities ShoAlt,StpAlt,NotAlt,CtnAlt, ShoStr,StpStr,NotStr,CtnStr U6. String Utilities SetSub,TrmStr,SetPrm,CnvStr,FndTxt, NumToS,SToNum U7. String List Utilities GetStr,SetStr,SrtLst,DupLst U8. Memory Utilities ChkMem,NewBlk,PrgCmd,DoUnld U9. Other Utilities ChgCur,PstEvt,PstNot,SetIdl,EndIdl